<!--#include file="rent_inc.asp" -->
<!--#include virtual="/common/Cls_Page.asp" -->
<%
Dim city,area
If Request.ServerVariables ("Request_Method")="POST" Then
	city		= Reform("city") 
	area		= Reform("area")
	rent_price	= Reform("rent_price")
	room_type	= Reform("room_type")
Else
	city		= Requery("city") 
	area		= Requery("area")
	rent_price	= Requery("rent_price")
	room_type	= Requery("room_type")
End If 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="robots" content="all" />
<meta name="author" content="963123.com" />
<meta name="Copyright" content="Copyright (c) 2010 963123.com" />
<meta name="Description" content="海南家政信息服务平台" />
<meta name="Keywords" content="海南家政网,家政,家教,家庭服务,保洁,保姆,护理,钟点工,海南旅游,海南美食,生活,生活服务" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>海南房出售_售房_三亚房屋出售_售房 - 海南家政服务热线963123</title>
<link href="/skin/lafot/houseview.css" rel="stylesheet" type="text/css" media="screen" />
<script language="javascript" src="javascript/rent.js"></script>

</head>
<body>
<div id="header">
  <div class="m top">
    <h1><a href="/" class="logo" title="海南家政信息服务平台,咨询热线：963123"><span>963123.com</span></a></h1>
    <h2 title="海南家政网：宝岛居家旅行全方位的生活指南,真诚服务，方便到家！">宝岛旅游居家全方位的生活指南！</h2>
    <div class="top_m">
    <p class="ireg"><a href="/Member/">登录</a> | <a href="/Member/user_reg.asp">注册</a></p>
      <div class="i_nav">
        <ul>
            <li ><a href="/">首页</a></li>
            <li><a href="/News/">资讯</a></li>
            <li><a href="/Family/">家政</a></li>
            <li class="selected"><a href="/Rent/">房产</a></li>
            <li ><a href="/Foods/">美食</a></li>
            <li ><a href="/Sale/">打折</a></li>
            <li ><a href="/HR/">人才</a></li>
            <li ><a href="/ask/">问答</a></li>
        </ul>
      </div>
      
    </div>
    
  </div>
</div>
<!--E:Header-->
<div class="m">
	<div class="rents" style="height:198px;"></div>
</div>
<div id="menu">
	<div class="m">
        <div class="rentnav">
            <ul>
				<% Call  sub_menu("") %>
            </ul>

        </div>
    </div>
</div>
<!--E:Menu-->
<div class="m">
	<div class="union_hot" id="hn_foods_one">您当前的位置： <a href="/rent/">房产</a> > 出售</div>
</div>
<div id="content">
    <div class="m">
    <div class="un-list-tag">
        <form id="form_search" name="form_search" action="sell.asp" method="post">
        <ul>
            <li><label>城市：</label><% Call City_List(city)%></li>
			
			<% If IsNumeric(city) Then %>
            <li><label>区域：</label><% Call Area_List(area)%></li>
			<% End If %>
			
            <li><label>租金：</label><% Call Rent_Price_List(rent_price)%></li>
            <li><label>房型：</label><% Call Room_Type_List(room_type)%></li>
        </ul>
		<input name="city" type="hidden" value="<%=city%>" />
		<input name="area" type="hidden" value="<%=area%>" />
		<input name="rent_price" type="hidden" value="<%=rent_price%>" />
		<input name="room_type" type="hidden" value="<%=room_type%>" />

        </form>	
    </div>
	<!--E:UN-LIST-TAG-->
   

        	<div class="un-list">
 		<%	

			Dim Ors		
			Set Ors = New Class_Page

			Sql = " 1=1 "
			If IsNumeric(city) Then 
				sql = Sql &" AND City_Area IN (SELECT ID FROM City_Area WHERE parent_id="&city&")"
			End If 
			Sql = EqualSql("City_Area",area,Sql)
			Sql = EqualSql("Price_Type",rent_price,Sql)
			Sql = EqualSql("room_type",room_type,Sql)
			'If IsNumeric(corp_type) Then 
			'	sql = Sql &" AND Room_Type IN (SELECT ID FROM Room_Type WHERE parent_id="&corp_type&")"
			'End If 
			'Sql = EqualSql("Corp_Type",corp_type2,Sql)
			'Sql = Sql & " AND (HT_Travel_Type ='一日游' )"

			'================================
			'Table 查询的表或是视图
			Ors.Table="Rent_Info"

			'Field SQL语句SELECT数据库的字段
			Ors.Field="ID,Rent_Title,Room_Pic,Room_Tel,Room_Addrsss,Rent_Price,Room_Addrsss_S,update_date,Room_ZX,Room_Floor,Rent_Price,Room_Area,Rent_Type,Room_Type2"
			'Pkey主键
			Ors.Pkey="ID"

			'OrderBy 排序字段


			Ors.OrderBy="Update_Date DESC"

			Ors.PageSize=10 '每页记录数

			'Condition 使用的条件，Tt_Title_Sql.....等等
			Ors.Condition=sql

			'PostString Tt_Title表单POST过来的值进行传递，该处适用POST和GET
			Ors.PostString = "city|area|rent_price|room_type"

			RecCount = Ors.RecCount() '记录总数
			Array_List = Ors.ResultSet() '返回ResultSet

			If RecCount>0 Then
			%>
        	<h2>找到<%=RecCount%>条房源</h2>
            <div class="rentlist">
            	<ul>
					<%
					For i=0 To UBound(Array_List,2)
						ID				= Array_List(0,i)
						Rent_Title		= Array_List(1,i)
						Room_Pic		= Array_List(2,i) 
						Room_Tel		= Array_List(3,i)
						Room_Address	= Array_List(4,i)
						Rent_Price		= Array_List(5,i)
						Rent_Address_S	= Array_List(6,i)
						update_date		= FormatDateTime(Array_List(7,i),2)
						Room_ZX			= Array_List(8,i)
						Room_Floor		= Array_List(9,i)
						Rent_Price		= Array_List(10,i)
						Room_Area		= Array_List(11,i)
						Rent_Type		= Array_List(12,i)
						Room_Type2		= Array_List(13,i)
						detail_url		= "sell_detail.asp?ID="&ID
					%>
                	<li>
                    	<p class="unimg"><a href="<%=detail_url%>"><img src="<%=Room_Pic%>" width=116 height=64 /></a></p>
                        <div class="uninfo">
                        <h3><%=Rent_Title%></h3>
                        <p>地址：<%=Room_Address%></p>
                        <p>售价：<%=Rent_Price%></p>
                        <p class="s_date">发布：<%=update_date%></p>
                        </div>
                    </li>
					<% Next %>



                   </ul>
               </div>
			<% If Ors.PageCount()>1 Then %>
				<div class="pages tc"><% Call Ors.ShowPage4() %></div> 
			<% End If %>
			<% End If %>
            <!-- S:PAGES -->

        </div>
         <!--E:un-list-->
    </div>
</div>
<!--E:Content-->

<!--#include Virtual="/include/bottom.asp" -->

</body>
</html>
<%
Sub City_List(City_Value)
	If City_Value="" Or IsNumeric(City_Value)=False Then 
		Response.Write "<a class=""active"">不限</a> "
		area=""
	Else
		Response.Write "<a onclick=""Rent_Search('','1')"">不限</a>"			
	End If 
	City_List_Array = GetRsRows("SELECT id,ca_name FROM City_Area WHERE parent_id=0 ORDER BY CA_Order ASC")
	If IsArray(City_List_Array) Then 
	For i=0  To UBound(City_List_Array,2)
		If CStr(City_List_Array(0,i))=CStr(City_Value) Then 
			Response.Write "<a class=""active"">"&City_List_Array(1,i)&"</a> "
		Else
			Response.Write "<a onclick=""Rent_Search('"&City_List_Array(0,i)&"','1')"">"&City_List_Array(1,i)&"</a>"			
		End If
	Next
	End If 

End Sub 
Sub Area_List(area_value)
	If area_value="" Or IsNumeric(area_value)=False Then 
		Response.Write "<a class=""active"">不限</a> "
	Else
		Response.Write "<a onclick=""Rent_Search('','2')"">不限</a>"			
	End If 

	Area_List_Array = GetRsRows("SELECT id,ca_name FROM City_Area WHERE parent_id="&city&" ORDER BY CA_Order ASC")
	If IsArray(Area_List_Array) Then 
	For i=0  To UBound(Area_List_Array,2)
		If CStr(Area_List_Array(0,i))=CStr(area_value) Then 
			Response.Write "<a class=""active"">"&Area_List_Array(1,i)&"</a> "
		Else
			Response.Write "<a onclick=""Rent_Search('"&Area_List_Array(0,i)&"','2')"">"&Area_List_Array(1,i)&"</a>"			
		End If
	Next
	End If 

End Sub 

Sub Rent_Price_List(rent_price_value)

	Price_value	 = ",1,2,3,4,5,6,7,8,9,10"
	Price_Option = "不限,¥500以下,¥500～¥800,¥800～¥1000,¥1000～¥1200,¥1200～¥1500,¥1500～¥2000,¥2000～¥3000,¥3000～¥5000,¥5000以上,面议"

	Price_value_Array  = Split(Price_value,",")
	Price_Option_Array = Split(Price_Option,",")

	For i=0  To UBound(Price_value_Array)
		If Price_value_Array(i)=rent_price_value Then 
			
			Response.Write "<a href=""#"" class=""active"">"&Price_Option_Array(i)&"</a> "
		Else
			Response.Write "<a href=""#""  onclick=""Rent_Search('"&Price_value_Array(i)&"','3')"">"&Price_Option_Array(i)&"</a> "			
		End If
	Next
End Sub


Sub Room_Type_List(room_value)

	Room_Type_value	 = ",一居,二居,三居,四居,五居,五居以上"
	Room_Type_Option = "不限,一居,二居,三居,四居,五居,五居以上"
	
	Room_Type_value_Array  = Split(Room_Type_value,",")
	Room_Type_Option_Array = Split(Room_Type_Option,",")

	For i=0  To UBound(Room_Type_value_Array)
		If Room_Type_value_Array(i)=room_value Then 
			
			Response.Write "<a href=""#"" class=""active"">"&Room_Type_Option_Array(i)&"</a> "
		Else
			Response.Write "<a href=""#""  onclick=""Rent_Search('"&Room_Type_value_Array(i)&"','4')"">"&Room_Type_Option_Array(i)&"</a> "			
		End If
	Next

End Sub 

%>